//
//  MFWHttpTask.h
//  MFWSdk
//
//  Created by Song Xiaofeng on 13-7-24.
//  Copyright (c) 2013年 Mafengwo Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

@class MFWDataIdentifier;
@protocol ASIProgressDelegate;
@class MFWDataModel;
@class MFWJson;


typedef void(^Block)(BOOL success, NSArray *items,NSString* errorMsg);

@interface MFWHttpTask : MFWTask
{
    
    NSMutableDictionary *_argsDic;
    
    NSMutableSet *_senders;
    
    __weak id<ASIProgressDelegate> _progressDelegate;
}

@property(nonatomic, strong)NSMutableDictionary *argsDic;
@property(nonatomic, strong, readonly)NSMutableSet *senders;
@property(nonatomic, weak)id<ASIProgressDelegate> downloadProgressDelegate;
@property(nonatomic, weak)id<ASIProgressDelegate> uploadProgressDelegate;
@property(nonatomic,copy)Block block;
@property(nonatomic, retain) id userInfo;


- (BOOL)addToEngine;

+ (MFWHttpTask*)task;
+ (MFWHttpTask*)taskWithSender:(id)sender forDataIdentifier:(MFWDataIdentifier*)dataIdentifier;
+ (MFWHttpTask*)taskWithSender:(id)sender forDataIdentifier:(MFWDataIdentifier *)dataIdentifier requestType:(MFWDataRequestType)requestType;
@end

